<template>
	<view>
		<cu-custom bgColor="bg-cyan" isBack>
			<block slot="content">switch开关</block>
		</cu-custom>
		<view class="smart-panel-head">
			<view class="smart-panel-head-title">
				switch
				</view>
				</view>
				<view class="smart-padding-wrap">
					<view class="uni-title">默认样式</view>
					<view>
						<switch checked @change="switch1Change" />
						<switch @change="switch2Change" />
					</view>
					<view class="uni-title">不同颜色和尺寸</view>
					<view>
						<switch checked color="#ffcc33" style="transform:scale(0.7)" />
						<switch checked color="#ffcc33" style="transform:scale(0.7)" />
					</view>
					</view>
					</view>
</template>

<script>
	export default{
		data(){
			return{};
		},
		methods:{
			switch1Change(e){
				console.log('switch1发生change事件,携带值为',e.detail.value)
			},
			switch2Change(e){
				console.log('switch2发生change事件,携带值为',e.detail.value)
			}
		}
	}
</script>

<style>
</style>